Part Number Hot Search : 
EL2120CS SBA60 NE900275 C30665 5N2008 N60C3 74HCT86D 301C55A
Product Description
Full Text Search
 

To Download DS3231 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  general description the DS3231 is a low-cost, extremely accurate i 2 c real- time clock (rtc) with an integrated temperature- compensated crystal oscillator (tcxo) and crystal. the device incorporates a battery input, and maintains accu- rate timekeeping when main power to the device is inter- rupted. the integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. the DS3231 is available in commercial and industrial temperature ranges, and is offered in a 16-pin, 300-mil so package. the rtc maintains seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. two programmable time-of- day alarms and a programmable square-wave output are provided. address and data are transferred serially through an i 2 c bidirectional bus. a precision temperature-compensated voltage refer- ence and comparator circuit monitors the status of v cc to detect power failures, to provide a reset output, and to automatically switch to the backup supply when nec- essary. additionally, the rst pin is monitored as a pushbutton input for generating a reset externally. applications servers utility power meters telematics gps features ? accuracy ?ppm from 0? to +40? ? accuracy ?.5ppm from -40? to +85? ? battery backup input for continuous timekeeping ? operating temperature ranges commercial: 0? to +70? industrial: -40? to +85? ? low-power consumption ? real-time clock counts seconds, minutes, hours, day, date, month, and year with leap year compensation valid up to 2100 ? two time-of-day alarms ? programmable square-wave output ? fast (400khz) i 2 c interface ? 3.3v operation ? digital temp sensor output: ?? accuracy ? register for aging trim ? rst input/output ? ul recognized DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal ______________________________________________ maxim integrated products 1 rev 2; 6/05 for pricing, delivery, and ordering information, please contact maxim/dallas direct! at 1-888-629-4642, or visit maxim? website at www.maxim-ic.com. ordering information part temp range pin-package top mark DS3231s 0? to +70? 16 so DS3231 DS3231sn -40? to +85? 16 so DS3231n DS3231s+ 0? to +70? 16 so DS3231+ DS3231sn+ -40? to +85? 16 so DS3231n+ pin configuration appears at end of data sheet. purchase of i 2 c components from maxim integrated products, inc., or one of its sublicensed associated companies, conveys a license under the philips i 2 c patent rights to use these components in an i 2 c system, provided that the system conforms to the i 2 c standard specification as defined by philips. DS3231 v cc scl r pu r pu = t r /c b r pu int/sqw 32khz v bat pushbutton reset sda rst n.c. n.c. n.c. n.c. v cc v cc gnd v cc cpu n.c. n.c. n.c. n.c. t ypical operating circuit +denotes lead-free
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal 2 _____________________________________________________________________ absolute maximum ratings recommended dc operating conditions (t a = t min to t max , unless otherwise noted.) (notes 1, 2) stresses beyond those listed under ?bsolute maximum ratings?may cause permanent damage to the device. these are stress rating s only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specificatio ns is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. voltage range on v cc , v bat , 32khz, scl, sda, rst , int /sqw relative to ground.............................-0.3v to +6.0v operating temperature range (noncondensing) .............................................-40? to +85? junction temperature ......................................................+125? storage temperature range ...............................-40? to +85? lead temperature (soldering, 10s).....................................................+260?/10s soldering temperature....................................see the handling, pc board layout, and assembly section. parameter symbol conditions min typ max units v cc 2.3 3.3 5.5 v supply voltage v bat 2.3 3.0 5.5 v logic 1 input sda, scl v ih 0.7 x v cc v cc + 0.3 v logic 0 input sda, scl v il -0.3 +0.3 x v cc v pullup voltage (sda, scl, 32khz, int /sqw) v pu v cc = 0v 5.5v v electrical characteristics (v cc = 2.3v to 5.5v, v cc > v bat , t a = t min to t max , unless otherwise noted.) (typical values are at v cc = 3.3v, v bat = 3.0v, and t a = +25?, unless otherwise noted.) (notes 1, 2) parameter symbol conditions min typ max units v cc = 3.63v 200 active supply current i cca (notes 3, 4) v cc = 5.5v 300 ? v cc = 3.63v 110 standby supply current i ccs i 2 c bus inactive, 32khz output on, sqw output off (note 4) v cc = 5.5v 170 ? v cc = 3.63v 575 temperature conversion current i ccsconv i 2 c bus inactive, 32khz output on, sqw output off v cc = 5.5v 650 ? power-fail voltage v pf 2.45 2.575 2.70 v logic 0 output, 32khz, int /sqw, sda v ol i ol = 3ma 0.4 v logic 0 output, rst v ol i ol = 1ma 0.4 v output leakage current 32khz, int /sqw, sda i lo output high impedance -1 0 +1 ? input leakage scl i li -1 +1 ? rst pin i/o leakage i ol rst high impedance (note 5) -200 +10 ? v bat leakage current (v cc active) i batlkg 25 100 na
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal _____________________________________________________________________ 3 electrical characteristics (continued) (v cc = 2.3v to 5.5v, v cc > v bat , t a = t min to t max , unless otherwise noted.) (typical values are at v cc = 3.3v, v bat = 3.0v, and t a = +25?, unless otherwise noted.) (notes 1, 2) parameter symbol conditions min typ max units output frequency f out v cc = 3.3v or v bat = 3.3v 32.768 khz 0? to +40? ? frequency stability vs. temperature (commercial) ? f/f out v cc = 3.3v or v bat = 3.3v, aging offset = 00h >40? to +70? ?.5 ppm -40? to <0? ?.5 0? to +40? ? frequency stability vs. temperature (industrial) ? f/f out v cc = 3.3v or v bat = 3.3v, aging offset = 00h >40? to +85? ?.5 ppm frequency stability vs. voltage ? f/v 1 ppm/v -40? 0.7 +25? 0.1 +70? 0.4 trim register frequency sensitivity per lsb ? f/lsb specified at: +85? 0.8 ppm temperature accuracy temp v cc = 3.3v or v bat = 3.3v -3 +3 ? first year ?.0 crystal aging ? f/f 0 after reflow, not production tested 0?0 years ?.0 ppm electrical characteristics ( v cc = 0v, v bat = 2.3v to 5.5v , t a = t min to t max , unless otherw.ise noted.) (note 1) parameter symbol conditions min typ max units v bat = 3.63v 70 active battery current i bata eosc = 0, bbsqw = 0, scl = 400khz (note 4) v bat = 5.5v 150 ? v bat = 3.63v 0.84 3.0 timekeeping battery current i batt eosc = 0, bbsqw = 0, en32khz = 1, scl = sda = 0v or s c l = s d a = v bat ( note 4) v bat = 5.5v 1.0 3.5 ? v bat = 3.63v 575 temperature conversion current i battc eosc = 0, bbsqw = 0, scl = sda = 0v or scl = sda = v bat v bat = 5.5v 650 ? data-retention current i battdr eosc = 1, scl = sda = 0v, +25? 100 na
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal 4 _____________________________________________________________________ ac electrical characteristics (v cc = v cc(min) to v cc(max) or v bat = v bat(min) to v bat(max) , v bat > v cc , t a = t min to t max , unless otherwise noted.) (note 1) parameter symbol conditions min typ max units fast mode 100 400 scl clock frequency f scl standard mode 0 100 khz fast mode 1.3 bus free time between stop and start conditions t buf standard mode 4.7 ? fast mode 0.6 hold time (repeated) start condition (note 6) t hd:sta standard mode 4.0 ? fast mode 1.3 low period of scl clock t low standard mode 4.7 ? fast mode 0.6 high period of scl clock t high standard mode 4.0 ? fast mode 0 0.9 data hold time (notes 7, 8) t hd:dat standard mode 0 0.9 ? fast mode 100 data setup time (note 9) t su:dat standard mode 250 ns fast mode 0.6 start setup time t su:sta standard mode 4.7 ? fast mode 300 rise time of both sda and scl signals (note 10) t r standard mode 20 + 0.1c b 1000 ns fast mode 300 fall time of both sda and scl signals (note 10) t f standard mode 20 + 0.1c b 300 ns fast mode 0.6 setup time for stop condition t su:sto standard mode 4.7 ? capacitive load for each bus line (note 10) c b 400 pf capacitance for sda, scl c i/o 10 pf pulse width of spikes that must be suppressed by the input filter t sp 30 ns pushbutton debounce pb db 250 ms reset active time t rst 250 ms oscillator stop flag (osf) delay t osf (note 11) 100 ms temperature conversion time t conv 125 200 ms power-switch characteristics (t a = t min to t max ) parameter symbol conditions min typ max units v cc fall time; v pf(max) to v pf(min) t vccf 300 ? v cc rise time; v pf(min) to v pf(max) t vccr 0s recovery at power-up t rec (note 12) 250 300 ms
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal _____________________________________________________________________ 5 pushbutton reset timing t rst pb db rst power-switch timing v cc t vccf t vccr t rec v pf(max) v pf v pf v pf(min) rst
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal 6 _____________________________________________________________________ data transfer on i 2 c serial bus sda scl t hd:sta t low t high t r t f t buf t hd:dat t su:dat repeated start t su:sta t hd:sta t su:sto t sp stop start note 1: limits at -40? are guaranteed by design and not production tested. note 2: all voltages are referenced to ground. note 3: i cca ?cl clocking at max frequency = 400khz. note 4: current is the averaged input current, which includes the temperature conversion current. note 5: the rst pin has an internal 50k ? (nominal) pullup resistor to v cc . note 6: after this period, the first clock pulse is generated. note 7: a device must internally provide a hold time of at least 300ns for the sda signal (referred to the v ih(min) of the scl signal) to bridge the undefined region of the falling edge of scl. note 8: the maximum t hd:dat needs only to be met if the device does not stretch the low period (t low ) of the scl signal. note 9: a fast-mode device can be used in a standard-mode system, but the requirement t su:dat 250ns must then be met. this is automatically the case if the device does not stretch the low period of the scl signal. if such a device does stretch the low period of the scl signal, it must output the next data bit to the sda line t r(max) + t su:dat = 1000 + 250 = 1250ns before the scl line is released. note 10: c b ?otal capacitance of one bus line in pf. note 11: the parameter t osf is the period of time the oscillator must be stopped for the osf flag to be set over the voltage range of 0.0v v cc v cc(max) and 2.3v v bat 3.4v. note 12: this delay applies only if the oscillator is enabled and running. if the eosc bit is a 1, the startup time of the oscillator is added to this delay.
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal _____________________________________________________________________ 7 standby supply current vs. supply voltage DS3231 toc01 v cc (v) i ccs ( a) 5.0 4.0 3.0 50 100 150 0 2.0 rst active supply current vs. supply voltage DS3231 toc02 v bat (v) i bat ( a) 5.0 4.0 3.0 0.800 0.900 1.000 1.100 1.200 0.700 2.0 v cc = 0v supply current vs. temperature DS3231 toc03 temperature ( c) i bat ( a) 80.0 60.0 40.0 20.0 0.0 -20.0 0.700 0.800 0.900 1.000 0.600 -40.0 v bat = 3.0v frequency deviation vs. temperature vs. aging value DS3231 toc04 crystal aging register value frequency deviation (ppm) 96 64 0 32 -64 -32 -96 -40 -30 -20 -10 0 10 20 30 40 50 60 -128 128 +85 c -40 c +70 c 0 c +40 c -40 c +85 c +25 c +40 c +25 c +70 c 0 c t ypical operating characteristics (v cc = +3.3v, t a = +25?, unless otherwise noted.)
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal 8 _____________________________________________________________________ block diagram n n n rst v cc 32khz int/sqw clock and calendar registers user buffer (7 bytes) i 2 c interface and address register decode power control v cc v bat gnd scl sda temperature sensor control logic/ divider pushbutton reset; square-wave buffer; int/sqw control control and status registers oscillator and capacitor array x1 x2 DS3231
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal _____________________________________________________________________ 9 pin description pin name function 1 32khz 32khz output. this open-drain pin requires an external pullup resistor. it may be left open if not used. 2v cc dc power pin for primary power supply. this pin should be decoupled using a 0.1f to 1.0f capacitor. if not used, connect to ground. 3 int /sqw active-low interrupt or square-wave output. this open-drain pin requires an external pullup resistor. it may be left open if not used. this multifunction pin is determined by the state of the intcn bit in the control register (0eh). when intcn is set to logic 0, this pin outputs a square wave and its frequency is determined by rs2 and rs1 bits. when intcn is set to logic 1, then a match between the timekeeping registers and either of the alarm registers activates the int /sqw pin (if the alarm is enabled). because the intcn bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms disabled. 4 rst acti ve- low reset. thi s p i n i s an op en- d r ai n i np ut/outp ut. it i nd i cates the status of v c c r el ati ve to the v p f sp eci fi cati on. as v c c fal l s b el ow v p f , the rs t p i n i s d r i ven l ow . w h en v c c exceed s v p f , for t r s t , the rs t p i n i s d r i ven hi g h i m p ed ance. the acti ve- l ow , op en- d r ai n outp ut i s com b i ned w i th a d eb ounced p ushb utton i np ut functi on. thi s p i n can b e acti vated b y a p ushb utton r eset r eq uest. it has an i nter nal 50k  nom i nal val ue p ul l up r esi stor to v c c . n o exter nal p ul l up r esi stor s s houl d b e connected . if the cr ystal osci l l ator i s d i sab l ed , the star tup ti m e of the osci l l ator i s ad d ed to the t r s t d el ay. 5e12 n.c. no connection. must be connected to ground. 13 gnd ground 14 v bat backup power-supply input. this pin should be decoupled using a 0.1f to 1.0f low-leakage capacitor. if the i 2 c interface is inactive whenever the device is powered by the v b a t input, the decoupling capacitor is not required. if v b a t is not used, connect to ground. ul recognized to ensure against reverse charging when used with a lithium battery. go to www.maxim-ic.com/qa/info/ul. 15 sda serial data input/output. this pin is the data input/output for the i 2 c serial interface. this open-drain pin requires an external pullup resistor. 16 scl serial clock input. this pin is the clock input for the i 2 c serial interface and is used to synchronize data movement on the serial interface. detailed description the DS3231 is a serial rtc driven by a temperature- compensated 32khz crystal oscillator. the tcxo pro- vides a stable and accurate reference clock, and maintains the rtc to within 2 minutes per year accu- racy from -40?c to +85?c. the tcxo frequency output is available at the 32khz pin. the rtc is a low-power clock/calendar with two programmable time-of-day alarms and a programmable square-wave output. the int /sqw provides either an interrupt signal due to alarm conditions or a square-wave output. the clock/cal- endar provides seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. the internal registers are accessible though an i 2 c bus interface. a temperature-compensated voltage reference and comparator circuit monitors the level of v cc to detect power failures and to automatically switch to the back- up supply when necessary. the rst pin provides an external pushbutton function and acts as an indicator of a power-fail event.
DS3231 operation the block diagram shows the main elements of the DS3231. the eight blocks can be grouped into four functional groups: tcxo, power control, pushbutton function, and rtc. their operations are described sep- arately in the following sections. 32khz tcxo the temperature sensor, oscillator, and control logic form the tcxo. the controller reads the output of the on-chip temperature sensor and uses a lookup table to determine the capacitance required, adds the aging correction in age register, and then sets the capaci- tance selection registers. new values, including changes to the age register, are loaded only when a change in the temperature value occurs, or when a user-initiated temperature conversion is completed. the temperature is read on initial application of v cc and once every 64 seconds afterwards. power control this function is provided by a temperature-compensat- ed voltage reference and a comparator circuit that monitors the v cc level. when v cc is greater than v pf , the part is powered by v cc . when v cc is less than v pf but greater than v bat , the DS3231 is powered by v cc . if v cc is less than v pf and is less than v bat , the device is powered by v bat . see table 1. to preserve the battery, the first time v bat is applied to the device, the oscillator will not start up until v cc is applied, or until a valid i 2 c address is written to the part. typical oscillator startup time is less than one sec- ond. approximately 2 seconds after v cc is applied, or a valid i 2 c address is written, the device makes a tem- perature measurement and applies the calculated cor- rection to the oscillator. once the oscillator is running, it continues to run as long as a valid power source is available (v cc or v bat ), and the device continues to measure the temperature and correct the oscillator fre- quency every 64 seconds. pushbutton reset function the DS3231 provides for a pushbutton switch to be con- nected to the rst output pin. when the DS3231 is not in a reset cycle, it continuously monitors the rst signal for a low going edge. if an edge transition is detected, the DS3231 debounces the switch by pulling the rst low. after the internal timer has expired (pb db ), the DS3231 continues to monitor the rst line. if the line is still low, the DS3231 continuously monitors the line looking for a rising edge. upon detecting release, the DS3231 forces the rst pin low and holds it low for t rst . the same pin, rst , is used to indicate a power-fail con- dition. when v cc is lower than v pf , an internal power-fail signal is generated, which forces the rst pin low. when v cc returns to a level above v pf , the rst pin is held low for approximately 250ms (t rec ) to allow the power sup- ply to stabilize. if the oscillator is not running (see the power control section) when v cc is applied, t rec is bypassed and rst immediately goes high. real-time clock with the clock source from the tcxo, the rtc provides seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is automati- cally adjusted for months with fewer than 31 days, includ- ing corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. the clock provides two programmable time-of-day alarms and a programmable square-wave output. the int /sqw pin either generates an interrupt due to alarm condition or outputs a square-wave signal and the selection is controlled by the bit intcn. address map figure 1 shows the address map for the DS3231 time- keeping registers. during a multibyte access, when the address pointer reaches the end of the register space (12h), it wraps around to location 00h. on an i 2 c start or address pointer incrementing to location 00h, the current time is transferred to a second set of regis- ters. the time information is read from these secondary registers, while the clock may continue to run. this eliminates the need to reread the registers in case the main registers update during a read. i 2 c interface the i 2 c interface is accessible whenever either v cc or v bat is at a valid level. if a microcontroller connected to the DS3231 resets because of a loss of v cc or other event, it is possible that the microcontroller and DS3231 i 2 c communications could become unsynchronized, e.g., the microcontroller resets while reading data from the DS3231. when the microcontroller resets, the extremely accurate i 2 c-integrated r tc/tcxo/crystal 10 ____________________________________________________________________ supply condition powered by v cc < v pf , v cc < v bat v bat v cc < v pf , v cc > v bat v cc v cc > v pf , v cc < v bat v cc v cc > v pf , v cc > v bat v cc table 1. power control
DS3231 i 2 c interface may be placed into a known state by toggling scl until sda is observed to be at a high level. at that point the microcontroller should pull sda low while scl is high, generating a start condition. clock and calendar the time and calendar information is obtained by read- ing the appropriate register bytes. figure 1 illustrates the rtc registers. the time and calendar data are set or ini- tialized by writing the appropriate register bytes. the con- tents of the time and calendar registers are in the binary-coded decimal (bcd) format. the DS3231 can be run in either 12-hour or 24-hour mode. bit 6 of the hours register is defined as the 12- or 24-hour mode select bit. when high, the 12-hour mode is selected. in the 12-hour mode, bit 5 is the am /pm bit with logic-high being pm. in the 24-hour mode, bit 5 is the second 10-hour bit (20?3 hours). the century bit (bit 7 of the month register) is tog- gled when the years register overflows from 99 to 00. the day-of-week register increments at midnight. values that correspond to the day of week are user- defined but must be sequential (i.e., if 1 equals sunday, then 2 equals monday, and so on). illogical time and date entries result in undefined operation. when reading or writing the time and date registers, sec- ondary (user) buffers are used to prevent errors when the internal registers update. when reading the time and date registers, the user buffers are synchronized to the internal registers on any start and when the register pointer rolls over to zero. the time information is read from these secondary registers, while the clock contin- ues to run. this eliminates the need to reread the regis- ters in case the main registers update during a read. DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal ____________________________________________________________________ 11 figure 1. timekeeing registers note: unless otherwise specified, the registers?state is not defined when power is first applied. address bit 7 msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 lsb function range 00h 0 10 seconds seconds seconds 00?9 01h 0 10 minutes minutes minutes 00?9 am /pm 02h 0 12/ 24 10 hour 10 hour hour hours 1?2 + am /pm 00?3 03h 0 0 0 0 0 day day 1? 04h 0 0 10 date date date 00?1 05h century 00 10 month month month/ century 01?2 + century 06h 10 year year year 00?9 07h a1m1 10 seconds seconds alarm 1 seconds 00?9 08h a1m2 10 minutes minutes alarm 1 minutes 00?9 am /pm 09h a1m3 12/ 24 10 hour 10 hour hour alarm 1 hours 1?2 + am /pm 00?3 day alarm 1 day 1? 0ah a1m4 dy/ dt 10 date date alarm 1 date 1?1 0bh a2m2 10 minutes minutes alarm 2 minutes 00?9 am /pm 0ch a2m3 12/ 24 10 hour 10 hour hour alarm 2 hours 1?2 + am /pm 00?3 day alarm 2 day 1? 0dh a2m4 dy/ dt 10 date date alarm 2 date 1?1 0eh eosc bbsqw conv rs2 rs1 intcn a2ie a1ie control 0fh osf 00 0 en32khz bsy a2f a1f control/status 10h sign data data data data data data data aging offset 11h sign data data data data data data data msb of temp 12h data data 00 00 00 lsb of temp
DS3231 the countdown chain is reset whenever the seconds register is written. write transfers occur on the acknowl- edge from the DS3231. once the countdown chain is reset, to avoid rollover issues the remaining time and date registers must be written within 1 second. the 1hz square-wave output, if enabled, transitions high 500ms after the seconds data transfer, provided the oscillator is already running. alarms the DS3231 contains two time-of-day/date alarms. alarm 1 can be set by writing to registers 07h to 0ah. alarm 2 can be set by writing to registers 0bh to 0dh. the alarms can be programmed (by the alarm enable and intcn bits of the control register) to activate the int /sqw output on an alarm match condition. bit 7 of each of the time-of-day/date alarm registers are mask bits (table 2). when all the mask bits for each alarm are logic 0, an alarm only occurs when the values in the timekeeping registers match the corresponding values stored in the time-of-day/date alarm registers. the alarms can also be programmed to repeat every sec- ond, minute, hour, day, or date. table 2 shows the pos- sible settings. configurations not listed in the table will result in illogical operation. the dy/ dt bits (bit 6 of the alarm day/date registers) control whether the alarm value stored in bits 0 to 5 of that register reflects the day of the week or the date of the month. if dy/ dt is written to logic 0, the alarm will be the result of a match with date of the month. if dy/ dt is written to logic 1, the alarm will be the result of a match with day of the week. when the rtc register values match alarm register set- tings, the corresponding alarm flag ?1f?or ?2f?bit is set to logic 1. if the corresponding alarm interrupt enable ?1ie?or ?2ie?is also set to logic 1 and the intcn bit is set to logic 1, the alarm condition will acti- vate the int /sqw signal. the match is tested on the once-per-second update of the time and date registers. extremely accurate i 2 c-integrated r tc/tcxo/crystal 12 ____________________________________________________________________ table 2. alarm mask bits alarm 1 register mask bits (bit 7) dy/ dt a1m4 a1m3 a1m2 a1m1 alarm rate x1 111 alarm once per second x1 110 alarm when seconds match x1 100 alarm when minutes and seconds match x1 000 alarm when hours, minutes, and seconds match 00 000 alarm when date, hours, minutes, and seconds match 10 000 alarm when day, hours, minutes, and seconds match alarm 2 register mask bits (bit 7) dy/ dt a2m4 a2m3 a2m2 alarm rate x1 11 alarm once per minute (00 seconds of every minute) x1 10 alarm when minutes match x1 00 alarm when hours and minutes match 00 00 alarm when date, hours, and minutes match 10 00 alarm when day, hours, and minutes match
special-purpose registers the DS3231 has two additional registers (control and status) that control the real-time clock, alarms, and square-wave output. control register (0eh) bit 7: enable oscillator ( eosc ). when set to logic 0, the oscillator is started. when set to logic 1, the oscilla- tor is stopped when the DS3231 switches to v bat . this bit is clear (logic 0) when power is first applied. when the DS3231 is powered by v cc , the oscillator is always on regardless of the status of the eosc bit. bit 6: battery-backed square-wave enable (bbsqw). when set to logic 1 and the DS3231 is being powered by the v bat pin, this bit enables the square-wave output when v cc is absent. when bbsqw is logic 0, the int /sqw pin goes high imped- ance when v cc falls below the power-fail trip point. this bit is disabled (logic 0) when power is first applied. bit 5: convert temperature (conv). setting this bit to 1 forces the temperature sensor to convert the temper- ature into digital code and execute the tcxo algorithm to update the capacitance array to the oscillator. this can only happen during the idle period. the status bit, bsy, prevents the bit from being set when bsy = 1. the user should check the status bit bsy before forcing the controller to start a new tcxo execution. a user-ini- tiated temperature conversion does not affect the inter- nal 64-second update cycle. a user-initiated temperature conversion does not affect the bsy bit for approximately 2ms. the conv bit remains at a 1 from the time it is written until the conver- sion is finished, at which time both conv and bsy go to 0. the conv bit should be used when monitoring the status of a user-initiated conversion. bits 4 and 3: rate select (rs2 and rs1). these bits control the frequency of the square-wave output when the square wave has been enabled. the following table shows the square-wave frequencies that can be select- ed with the rs bits. these bits are both set to logic 1 (8.192khz) when power is first applied. bit 2: interrupt control (intcn). this bit controls the int /sqw signal. when the intcn bit is set to logic 0, a square wave is output on the int /sqw pin. when the intcn bit is set to logic 1, then a match between the timekeeping registers and either of the alarm registers activates the int /sqw (if the alarm is also enabled). the corresponding alarm flag is always set regardless of the state of the intcn bit. the intcn bit is set to logic 1 when power is first applied. bit 1: alarm 2 interrupt enable (a2ie). when set to logic 1, this bit permits the alarm 2 flag (a2f) bit in the status register to assert int /sqw (when intcn = 1). when the a2ie bit is set to logic 0 or intcn is set to logic 0, the a2f bit does not initiate an interrupt signal. the a2ie bit is disabled (logic 0) when power is first applied. bit 0: alarm 1 interrupt enable (a1ie). when set to logic 1, this bit permits the alarm 1 flag (a1f) bit in the status register to assert int /sqw (when intcn = 1). when the a1ie bit is set to logic 0 or intcn is set to logic 0, the a1f bit does not initiate the int /sqw sig- nal. the a1ie bit is disabled (logic 0) when power is first applied. DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal ____________________________________________________________________ 13 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 eosc bbsqw conv rs2 rs1 intcn a2ie a1ie rs2 rs1 square-wave output frequency 00 1hz 01 1.024khz 10 4.096khz 11 8.192khz square-wave output frequency control register (0eh)
DS3231 status register (0fh) bit 7: oscillator stop flag (osf). a logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and may be used to judge the validity of the timekeeping data. this bit is set to logic 1 any time that the oscillator stops. the following are examples of conditions that can cause the osf bit to be set: 1) the first time power is applied. 2) the voltages present on both v cc and v bat are insufficient to support oscillation. 3) the eosc bit is turned off in battery-backed mode. 4) external influences on the crystal (i.e., noise, leak- age, etc.). this bit remains at logic 1 until written to logic 0. bit 3: enable 32khz output (en32khz). this bit indi- cates the status of the 32khz pin. when set to logic 1, the 32khz pin is enabled and outputs a 32.768khz square-wave signal. when set to logic 0, the 32khz pin goes to a high-impedance state. the initial power-up state of this bit is logic 1, and a 32.768khz square-wave signal appears at the 32khz pin after a power source is applied to the DS3231 (if the oscillator is running). bit 2: busy (bsy). this bit indicates the device is busy executing tcxo functions. it goes to logic 1 when the conversion signal to the temperature sensor is asserted and then is cleared when the device is in the 1-minute idle state. bit 1: alarm 2 flag (a2f). a logic 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 regis- ters. if the a2ie bit is logic 1 and the intcn bit is set to logic 1, the int /sqw pin is also asserted. a2f is cleared when written to logic 0. this bit can only be written to logic 0. attempting to write to logic 1 leaves the value unchanged. bit 0: alarm 1 flag (a1f). a logic 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 regis- ters. if the a1ie bit is logic 1 and the intcn bit is set to logic 1, the int /sqw pin is also asserted. a1f is cleared when written to logic 0. this bit can only be written to logic 0. attempting to write to logic 1 leaves the value unchanged. crystal aging the crystal aging offset register provides an 8-bit code to add to the codes in the capacitance array registers. the code is encoded in two? complement. one lsb represents one small capacitor to be switched in or out of the capacitance array at the crystal pins. the offset register is added to the capacitance array register under the following conditions: during a normal temper- ature conversion, if the temperature changes from the previous conversion, or during a manual user conver- sion (setting the conv bit). to see the effects of the aging register on the 32khz output frequency immedi- ately, a manual conversion should be started after each aging register change. positive aging values add capacitance to the array, slowing the oscillator frequency. negative values remove capacitance from the array, increasing the oscillator frequency. the change in ppm per lsb is different at different tem- peratures. the frequency vs. temperature curve is shift- ed by the values used in this register. at +25?, one lsb typically provides about 0.1ppm change in frequency. extremely accurate i 2 c-integrated r tc/tcxo/crystal 14 ____________________________________________________________________ bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 sign data data data data data data data crystal aging offset (10h) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 osf 0 0 0 en32khz bsy a2f a1f status register (0fh)
t emperature registers (11h?2h) temperature is represented as a 10-bit code with a res- olution of +0.25? and is accessible at location 11h and 12h. the temperature is encoded in two? comple- ment format. the upper 8 bits are at location 11h and the lower 2 bits are in the upper nibble at location 12h. upon power reset, the registers are set to a default temperature of 0? and the controller starts a tempera- ture conversion. new temperature readings are stored in this register. i 2 c serial data bus the DS3231 supports a bidirectional i 2 c bus and data transmission protocol. a device that sends data onto the bus is defined as a transmitter and a device receiv- ing data is defined as a receiver. the device that con- trols the message is called a master. the devices that are controlled by the master are slaves. the bus must be controlled by a master device that generates the serial clock (scl), controls the bus access, and gener- ates the start and stop conditions. the DS3231 operates as a slave on the i 2 c bus. connections to the bus are made through the scl input and open-drain sda i/o lines. within the bus specifications, a standard mode (100khz maximum clock rate) and a fast mode (400khz maximum clock rate) are defined. the DS3231 works in both modes. the following bus protocol has been defined (figure 2): data transfer may be initiated only when the bus is not busy. during data transfer, the data line must remain stable whenever the clock line is high. changes in the data line while the clock line is high are interpreted as control signals. accordingly, the following bus conditions have been defined: bus not busy: both data and clock lines remain high. start data transfer: a change in the state of the data line from high to low, while the clock line is high, defines a start condition. stop data transfer: a change in the state of the data line from low to high, while the clock line is high, defines a stop condition. data valid: the state of the data line represents valid data when, after a start condition, the data line is stable for the duration of the high period of the clock signal. the data on the line must be changed during the low period of the clock signal. there is one clock pulse per bit of data. each data transfer is initiated with a start condition and terminated with a stop condition. the number of data bytes transferred between the start and the stop conditions is not limited, and is determined by the master device. the information is transferred byte-wise and each receiver acknowledges with a ninth bit. acknowledge: each receiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. the master device must generate an extra clock pulse, which is associ- ated with this acknowledge bit. a device that acknowledges must pull down the sda line during the acknowledge clock pulse in such a way that the sda line is stable low during the high period of the acknowledge-related clock pulse. of course, setup and hold times must be taken into account. a master must signal an end of data to the slave by not generating an acknowledge bit on the last byte that has been clocked out of the slave. in this case, the slave must leave the data line high to enable the master to generate the stop condition. DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal ____________________________________________________________________ 15 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 sign data data data data data data data t emperature register (upper byte) (11h) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 data data 0 00000 t emperature register (lower byte) (12h)
DS3231 figures 3 and 4 detail how data transfer is accom- plished on the i 2 c bus. depending upon the state of the r/ w bit, two types of data transfer are possible: data transfer from a master transmitter to a slave receiver. the first byte transmitted by the master is the slave address. next follows a number of data bytes. the slave returns an acknowledge bit after each received byte. data is transferred with the most significant bit (msb) first. data transfer from a slave transmitter to a master receiver. the first byte (the slave address) is trans- mitted by the master. the slave then returns an acknowledge bit. next follows a number of data bytes transmitted by the slave to the master. the master returns an acknowledge bit after all received bytes other than the last byte. at the end of the last received byte, a not acknowledge is returned. the master device generates all the serial clock puls- es and the start and stop conditions. a transfer is ended with a stop condition or with a repeated start condition. since a repeated start condition is also the beginning of the next serial transfer, the bus will not be released. data is transferred with the most significant bit (msb) first. the DS3231 can operate in the following two modes: slave receiver mode (DS3231 write mode): serial data and clock are received through sda and scl. after each byte is received, an acknowledge bit is transmitted. start and stop conditions are recog- nized as the beginning and end of a serial transfer. address recognition is performed by hardware after reception of the slave address and direction bit. the slave address byte is the first byte received after the master generates the start condition. the slave address byte contains the 7-bit DS3231 address, which is 1101000, followed by the direction bit (r/ w ), which is 0 for a write. after receiving and decoding the slave address byte, the DS3231 outputs an extremely accurate i 2 c-integrated r tc/tcxo/crystal 16 ____________________________________________________________________ stop condition or repeated start condition repeated if more bytes are transfered ack start condition ack acknowledgement signal from receiver acknowledgement signal from receiver slave address msb scl sda r/w direction bit 12 678 9 12 89 3? figure 2. i 2 c data transfer overview a xxxxxxxx a 1101000 s 0 xxxxxxxx a xxxxxxxx a xxxxxxxx a p s = start a = acknowledge p = stop r/w = read/write or direction bit address = d0h data transferred (x + 1 bytes + acknowledge) figure 3. slave receiver mode (write mode) a xxxxxxxx a 1101000 s 1 xxxxxxxx a xxxxxxxx a xxxxxxxx a p s = start a = acknowledge p = stop a = not acknowledge r/w = read/write or direction bit address = d1h data transferred (x + 1 bytes + acknowledge) note: last data byte is followed by a not acknowledge (a) signal figure 4. slave transmitter mode (read mode)
acknowledge on sda. after the DS3231 acknowl- edges the slave address + write bit, the master transmits a word address to the DS3231. this sets the register pointer on the DS3231, with the DS3231 acknowledging the transfer. the master may then transmit zero or more bytes of data, with the DS3231 acknowledging each byte received. the register pointer increments after each data byte is trans- ferred. the master generates a stop condition to terminate the data write. slave transmitter mode (DS3231 read mode): the first byte is received and handled as in the slave receiver mode. however, in this mode, the direction bit indicates that the transfer direction is reversed. serial data is transmitted on sda by the DS3231 while the serial clock is input on scl. start and stop conditions are recognized as the beginning and end of a serial transfer. address recognition is performed by hardware after reception of the slave address and direction bit. the slave address byte is the first byte received after the master generates a start condition. the slave address byte contains the 7-bit DS3231 address, which is 1101000, fol- lowed by the direction bit (r/ w ), which is 1 for a read. after receiving and decoding the slave address byte, the DS3231 outputs an acknowledge on sda. the DS3231 then begins to transmit data starting with the register address pointed to by the register pointer. if the register pointer is not written to before the initiation of a read mode, the first address that is read is the last one stored in the register point- er. the DS3231 must receive a not acknowledge to end a read. handling, pc board layout, and assembly the DS3231 package contains a quartz tuning-fork crystal. pick-and-place equipment can be used, but precautions should be taken to ensure that excessive shocks are avoided. ultrasonic cleaning should be avoided to prevent damage to the crystal. avoid running signal traces under the package, unless a ground plane is placed between the package and the signal line. all n.c. (no connect) pins must be connect- ed to ground. moisture-sensitive packages are shipped from the facto- ry dry packed. handling instructions listed on the pack- age label must be followed to prevent damage during reflow. see ipc/jedec j-std-020 standard for moisture- sensitive device (msd) classifications and reflow pro- files. exposure to reflow is limited to 2 times maximum. DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal ____________________________________________________________________ 17
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal 18 ____________________________________________________________________ chip information transistor count: 33,000 substrate connected to ground process: cmos thermal information theta-ja: +73?/w theta-jc: +23?/w 16 15 14 13 12 11 10 9 1 2 3 4 5 6 7 8 32khz scl sda v bat gnd n.c. n.c. n.c. n.c. top view so v cc int/sqw n.c. rst n.c. n.c. n.c. DS3231s pin configuration
DS3231 extremely accurate i 2 c-integrated r tc/tcxo/crystal maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim product. no circu it patent licenses are implied. maxim reserves the right to change the circuitry and specifications without notice at any time. maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 ____________________ 19 2005 maxim integrated products printed usa is a registered trademark of maxim integrated products, inc. is a registered trademark of dallas semiconductor corporation. package information (the package drawing(s) in this data sheet may not reflect the most current specifications. for the latest package outline info rmation, go to www.maxim-ic.com/dallaspackinfo ) . 56-g4009-001.eps


▲Up To Search▲   

 
Price & Availability of DS3231

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X